import request from "../api/config";
import api from "../api/api";

//获取城市列表信息
export const cityListQuery = (params?:any) => {
    return request({
      method: "get",
      url: api.cityinfos.city,
      params
     
    });
  };

  //获取城市定位
  export const cityDingwei=(params:any)=>{
    return request({
      method:"get",
      url:api.citydingwei.dingwei,
      params
    })
  }

  //城市搜索
  export const citySearch=(params:any)=>{
    return request({
      method:"get",
      url:api.city.search,
      params
    })
  }

  //城市首页空气展示
  export const homeAir=(params:any)=>{
    return request({
      method:"get",
      url:api.air.cityair,
      params
    })
  }

  //城市首页温度展示
  export const homeTemp=(params:any)=>{
    return request({
      method:"get",
      url:api.temperature.citytemp,
      params
    })
  }

  //城市未来五天空气展示
  export const fulAirQuery=(params:any)=>{
    return request({
      method:"get",
      url:api.fultureair.fulair,
      params
    })
  }

  //城市未来五天天气展示
  export const fulTempQuery=(params:any)=>{
    return request({
      method:"get",
      url:api.fulturetemp.fultemp,
      params
    })
  }
  
  //城市24小时天气预报
  export const hourTempQuery=(params:any)=>{
    return request({
      method:"get",
      url:api.hourtemp.hourtemps,
      params
    })
  }
  
//城市24小时空气质量
export const hourAirQuery=(params:any)=>{
  return request({
    method:'get',
    url:api.hourair.hourairs,
    params
  })
}

//指定城市的生活指数
export const shenghuoQuery=(params:any)=>{
  return request({
    method:"get",
    url:api.shenghuo.shenghuos,
    params
  })
}